from collections import OrderedDict
import pandas as pd
examDict={'学习时间':[0.5,0.75,1.00,1.25,1.50,1.75,1.75,2.00,2.25,2.50,2.75,3.00,3.25,3.50,4.00,4.25,4.50,4.75,5.00,5.50],
          '分数':[10,22,13,43,20,22,33,50,62,48,55,75,62,73,81,76,64,82,90,93]
}
examOrderDict=OrderedDict(examDict)
examDf=pd.DataFrame(examOrderDict)
examDf.head()
#提取特征features
exam_X=examDf.loc[:,'学习时间']
#提取标签label
exam_y=examDf.loc[:,'分数']

#散点图matplotlib
import matplotlib.pyplot as plt
plt.scatter(exam_X,exam_y,color="b",label="exam data")
#添加图标
plt.xlabel("hello")
plt.ylabel("ojbect")
#显示图像
plt.show()